//
//  Common.h
//  models
//
//  Created by minfo on 13-3-4.
//  Copyright (c) 2013年 minfo. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ASIDownloadCache.h"

@interface Common : NSObject
{
}

- (NSMutableString*)GetWebAPI:(NSString*)FunName ; //手机请求端的 API
- (NSMutableString*)GetWebNewAPI:(NSString*)FunName;
- (int)Getlanguage; //客户端语言，0为英文,1为中文

- (NSString *)getImgPath;//获取缓存图片

- (NSString*)GetDeviceID; //手机设备唯一标识
+(void)SetToke:(NSString *)token;//写入token
+(NSString *)getToken;//获取token
- (NSString*)GetUserCoop; //1.0
-(NSString *)getIsBound;
- (NSString*)GetRegsource;//注册来源，客户端标识（sms，wap，invite,android，iphone，91iphone，jifengandroid。。。仅作为参考，不以此为准）

- (NSString*)GetChannel;//获取频道

- (NSString*)GetLocation;//获取城市

- (NSString*)GetApipwd;//接口密码

- (NSString*)GetMobile;//获取手机号

-(NSString *)GetStartImg;//获取启动页面图片

- (NSString*)GetUser;
//获取昵称
-(NSString*)GetSign;
- (NSInteger)GetUserID;//获取用户ID
+ (NSMutableString*)Coordinate:(NSString*)url; //经纬度
- (NSString*)GetAvatar;//获取头像
//获取昵称
-(NSString *)getAliasName;
- (NSString*)GetEncode:(NSString*) str; //获取UTF-8

-(void)ShowMessage:(NSString*)Title Remark:(NSString*)Remark;

//存储用户登录信息
-(void)SetUserinfo:(NSString*)UserName Password:(NSString*)Password UserID:(NSInteger)UserID Avatar:(NSString*)Avatar Gender:(NSString *)gender Sign:(NSString *)sign IsBound:(int)IsBound;

//存储用户登录信息
-(void)SetUserinfo:(NSString*)UserName Password:(NSString*)Password UserID:(NSInteger)UserID Avatar:(NSString*)Avatar Gender:(NSString *)gender Sign:(NSString *)sign;

//存储用户登录信息
-(void)SetUserinfo:(NSString*)UserName Password:(NSString*)Password UserID:(NSInteger)UserID;

//存储用户登录信息
-(void)SetUAvatar:(NSString*)Avatar;

-(void)SetStartImg:(NSString *)startImg;//网上获取启动页图片

- (BOOL)CheckLogin;

- (BOOL)CheckInvite;//获取邀请码

//获取文件路径方法
+ (NSString *)getHistoryPath;
//写入历史记录
+(void)SetHistorySearch:(NSMutableArray *)searchKey;
//获取历史记录
+(NSMutableArray *)GetHistorySearch;

//利用正则表达式验证
-(BOOL)isCheckEmail:(NSString *)str;

// 汉字验证(1-20个)
-(BOOL)isCheckChinese:(NSString *)str;
//验证身份证
-(BOOL)userIDNumCheck:(NSString *)IDNum;

// 纯英文(1-20个)
-(BOOL)isCheckLetters:(NSString *)str;

// 手机号
+(BOOL)isMobileCheck:(NSString *)str;
//城市
+(void)SetCity:(NSString*)city;
//获取城市
+(NSString *)GetCity;
+(void)SetProvince:(NSString*)province;
//获取省份
+(NSString *)GetProvince;
//获取手机
+(NSString *)GetPhone;


//绑定手机
+(void)setMobil:(NSString *)number;


//通知信息
+(void)SetNotification:(NSString *)swich;

//通知开关
+(NSString *)GetNotification;

//历史查询
//+(void)SetHistorySearch:(NSString *)searchKey;
@end